<!DOCTYPE html>
<html>

<head>
    <include file="Share:meta" />
    <style type="text/css">
        .trstyle0{ background-color: #e8e8e8; }
    </style>
</head>

<body class="hold-transition skin-blue sidebar-mini">
    <div class="wrapper">
        <include file="Share:header" />
        <include file="Share:left" />
        <!-- Content Wrapper. Contains page content -->
        <div class="content-wrapper">
            <!-- Content Header (Page header) -->
            <section class="content-header">
                <h1>订单列表<small><a target="_blank"></a></small></h1>
                <ol class="breadcrumb">
                    <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
                    <li class="active">订单列表</li>
                </ol>
            </section>
            <!-- Main content -->
            <section class="content">
                <div class="box">
                    <div class="box-header with-border">
                        <h3 class="box-title">列表</h3>
                        <div class="box-tools">
                            <form action="" method="GET" role="form">
                                <div class="input-group input-group-sm" style="width: 250px;">
                                    <input type="text" name="username" class="form-control pull-right" placeholder="Search">
                                    <div class="input-group-btn">
                                        <button type="submit" class="btn btn-default"><i class="fa fa-search"></i></button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body">
                        <table class="table table-bordered HjTable" border="1">
                            <tbody>
                                <tr style="background-color: #E6E6FA;">
                                    <th style="width: 5%;">订单号</th>
                                    <th style="width: 5%;">金额</th>
                                    <th style="width: 5%;">数量</th>
                                    <th style="width: 10%;">订单状态</th>
                                    <th style="width: 25%;">联系人</th>
                                    <th style="width: 15%;">下单时间</th>
                                    <th style="width: 20%"></th>
                                </tr>
                                <volist name="list" id="vo">
                                    <tr class='trstyle{$vo.status}'> <!--class='trstyle{$vo.status}' -->
                                        <tr class='trstyle{$vo.status}'>
                                        <!--class='trstyle{$vo.status}' -->
                                        <td>{$vo.order_no}</td>
                                        <td>{$vo.order_price}</td>
                                        <td>{$vo.number}</td>
                                        <td>{$orderStatus[$vo[order_status]]}</td>
                                        <td>
                                            {$vo.shipping_name} / {$vo.shipping_mobile}<br>
                                            {$vo.shipping_province}{$vo.shipping_city}{$vo.shipping_distinct}<br>
                                            {$vo.shipping_address}
                                        </td>
                                        <td>{$vo.ctime}</td>
                                        <td>
                                            <button onClick="Toast('{$vo.order_no}')" type="button" class="btn btn-warning">支付订单</button>
                                        </td>
                                    </tr>
                                </volist>
                            </tbody>
                        </table>
                    </div>
                    <!-- /.box-body -->
                    <div class="box-footer clearfix">
                        <ul class="pagination pagination-sm no-margin pull-right">
                            {$show}
                        </ul>
                    </div>
                </div>
            </section>
            <!-- /.content -->
        </div>
        <!-- /.content-wrapper -->
        <include file="Share:copyright" />
        <include file="Share:setting" />
    </div>
    <include file="Share:js" />
    <script type="text/javascript">
    $("#OrderManager").addClass("active");
    $("#worder_list").addClass("active");
    function Toast(order_no) {
        noty({
            text: '使用印刷码支付订单后无法撤销！确认支付订单：'+order_no+" ？",
            layout: 'center',
            template: '<div class="noty_message_h"><span class="noty_text"></span><div class="noty_close"></div></div>',
            buttons: [{
                addClass: 'btn btn-primary',
                text: '确定',
                onClick: function($noty) {
                    // this = button element 也就是当前的按钮
                    // $noty = $noty element 也就是当前这个提示信息对象
                    $noty.close();
                    window.location.href="__APP__/Admin/Order/payorder?order_no="+order_no;
                }
            }, {
                addClass: 'btn btn-danger',
                text: '取消',
                onClick: function($noty) {
                    $noty.close();
                }
            }]
        });
    }
    </script>
</body>

</html>
